import request from '@/utils/request'

// 查询题库类别列表
export function listQbmsCategory(query) {
  return request({
    url: '/qbms/qbmsCategory/list',
    method: 'get',
    params: query
  })
}

// 查询题库类树结构选项
export function treeselectQbmsCategory(query) {
  return request({
    url: '/qbms/qbmsCategory/treeselect',
    method: 'get',
    params: query
  })
}

// 查询题库类别详细
export function getQbmsCategory(id) {
  return request({
    url: '/qbms/qbmsCategory/' + id,
    method: 'get'
  })
}

// 新增题库类别
export function addQbmsCategory(data) {
  return request({
    url: '/qbms/qbmsCategory',
    method: 'post',
    data: data
  })
}

// 修改题库类别
export function updateQbmsCategory(data) {
  return request({
    url: '/qbms/qbmsCategory',
    method: 'put',
    data: data
  })
}

// 删除题库类别
export function delQbmsCategory(id) {
  return request({
    url: '/qbms/qbmsCategory/' + id,
    method: 'delete'
  })
}
